package com.rs.controller;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import com.rs.model.ZhWorklog;

import java.awt.Toolkit;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import java.awt.Font;
import java.awt.Color;

public class TeacherWorkLogText extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JTextField textField_1;

	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		EventQueue.invokeLater(new Runnable() {
//			public void run() {
//				try {
//					TeacherWorkLogText frame = new TeacherWorkLogText("");
//					frame.setVisible(true);
//				} catch (Exception e) {
//					e.printStackTrace();
//				}
//			}
//		});
//	}

	/**
	 * Create the frame.
	 */
	public TeacherWorkLogText(ZhWorklog zhWorklog) {
		setAlwaysOnTop(true);
		setResizable(false);
		setTitle("工作日志详情");
		setIconImage(Toolkit.getDefaultToolkit().getImage(TeacherWorkLogText.class.getResource("/images/logo1.png")));
//		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 584);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBounds(10, 10, 414, 526);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("教师名称：");
		lblNewLabel.setBounds(25, 37, 66, 15);
		panel.add(lblNewLabel);
		
		textField = new JTextField();
		textField.setEditable(false);
		textField.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		textField.setText(zhWorklog.getU_name());
		textField.setBounds(100, 34, 76, 21);
		panel.add(textField);
		textField.setColumns(10);
		
		JLabel label = new JLabel("发布时间：");
		label.setBounds(197, 37, 66, 15);
		panel.add(label);
		
		textField_1 = new JTextField();
		textField_1.setEditable(false);
		textField_1.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		textField_1.setText(zhWorklog.getWlTime());
		textField_1.setBounds(273, 34, 93, 21);
		panel.add(textField_1);
		textField_1.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("发布内容：");
		lblNewLabel_1.setBounds(25, 97, 66, 15);
		panel.add(lblNewLabel_1);
		
		JTextPane textPane = new JTextPane();
		textPane.setEditable(false);
		textPane.setForeground(Color.BLACK);
		textPane.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		textPane.setText(zhWorklog.getWlText());
		textPane.setBounds(99, 97, 267, 419);
		panel.add(textPane);
	}
}
